<html>
<head>
    <script>

        var currentUrl = null;

        function checkForValidUrl(tabId, changeInfo, tab) {
            chrome.pageAction.show(tabId);
            currentUrl = tab.url;
        };

        chrome.tabs.onUpdated.addListener(checkForValidUrl);

    </script>
</head>
</html>
